<?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It is a breeze. Simply tell Lumen the URIs it should respond to
| and give it the Closure to call when that URI is requested.
|
*/


use App\Http\Model\OutJson;

$router->get('/', function () use ($router) {
    return 'activity_api';// return $router->app->version();
});

//user
$router->group(['prefix' => 'invite'], function () use ($router) {
    $router->post('register', ['uses' => 'RegisterController@activityRegister']);
    $router->post('clcikAward', ['uses' => 'RegisterController@clcikAwardGoods']);
    $router->post('inviteUser', ['uses' => 'RegisterController@showInviteUser']);
    $router->post('sms_code', ['uses' => 'RegisterController@sendCode']);
    $router->post('sendGiftCode', ['uses' => 'RegisterController@sendGiftCode']);
    $router->post('checkCaptchaCode', ['uses' => 'RegisterController@checkCaptchaCode']);
    $router->post('checkSmsCode', ['uses' => 'RegisterController@checkeSmsCode']);
    $router->get('kk_blance', ['uses' => 'RegisterController@getLiaoB']);
    $router->post('kk_blance_to_diamond', ['uses' => 'RegisterController@kkBalanceToDiamond']);
    $router->post('getKkaudioUser', ['uses' => 'RegisterController@getKkaudioUser']);
    $router->get('user_info', ['uses' => 'RegisterController@getUserInfo']);
    $router->post('checkShare', ['uses' => 'RegisterController@checkShareDate']);
    $router->post('getShareConfig', ['uses' => 'RegisterController@getShareConfig']);
    $router->post('listenUserRecharge', ['uses' => 'DiamondController@listenUserRecharge']);
    $router->post('inviteRegister', ['uses' => 'RegisterController@activityRegister']);

});


$router->group(['prefix' => 'send'], function () use ($router) {
    $router->post('firstClick', ['uses' => 'SendPhoneController@firstClick']);
    $router->post('getPhoneList', ['uses' => 'SendPhoneController@getPhoneList']);
    $router->post('listenUserRecharge', ['uses' => 'SendPhoneController@listenUserRecharge']);
    $router->post('userSite', ['uses' => 'SendPhoneController@userSite']);
    $router->post('affirmPhone', ['uses' => 'SendPhoneController@affirmPhone']);
});
$router->group(['prefix' => 'giftBag'], function () use ($router) {
    $router->post('listeGiftBag', ['uses' => 'GiftBagController@listenUserRechareGiftBag']);
    $router->post('userGiftBagRank', ['uses' => 'GiftBagController@userGiftBagRank']);
    $router->post('clickGiftBag', ['uses' => 'GiftBagController@clickGiftBag']);
    $router->post('listenIntimacyValue', ['uses' => 'GiftBagController@listenIntimacyValue']);
    $router->post('getUserIntimacy', ['uses' => 'GiftBagController@getUserIntimacy']);
    $router->post('getGiftRank', ['uses' => 'GiftBagController@getGiftRank']);
    $router->post('awardGiftToRank', ['uses' => 'GiftBagController@awardGiftToRank']);
    $router->post('intimacyCheck', ['uses' => 'GiftBagController@intimacyCheck']);
    $router->post('editLog', ['uses' => 'GiftBagController@editLog']);
});

$router->group(['prefix' => 'lover'], function () use ($router) {
    $router->post('test', ['uses' => 'LoverController@assignAction']);
    $router->get('userRechargeGiftList', ['uses' => 'LoverController@userGiftList']);
    $router->get('clickGiftBag', ['uses' => 'LoverController@clickGiftBag']);
    $router->get('clickDiamondGift', ['uses' => 'LoverController@clickDiamondGift']);
    $router->get('diamondList', ['uses' => 'LoverController@diamondList']);
    $router->post('inviteRegister', ['uses' => 'LoverController@inviteRegister']);
    $router->post('listenUserRecharge', ['uses' => 'LoverController@listenUserRecharge']);
    $router->get('getUserFowl', ['uses' => 'LoverController@getUserFowl']);
    $router->post('convertFowl', ['uses' => 'LoverController@convertFowl']);
    $router->get('clickEgg', ['uses' => 'LoverController@clickEgg']);
    $router->get('cpEgg', ['uses' => 'LoverController@cpEgg']);
    $router->get('getShareConfig', ['uses' => 'LoverController@getShareConfig']);

});

$router->group(['prefix' => 'moon'], function () use ($router) {
    $router->post('test', ['uses' => 'MoonController@assignAction']);
    $router->get('userRechargeGiftList', ['uses' => 'MoonController@userGiftList']);
    $router->get('clickGiftBag', ['uses' => 'MoonController@clickGiftBag']);
    $router->post('inviteRegister', ['uses' => 'MoonController@inviteRegister']);
    $router->post('convertFowl', ['uses' => 'MoonController@convertFowl']);
    $router->get('getUserRabbit', ['uses' => 'MoonController@getUserRabbit']);
    $router->get('dialTicket', ['uses' => 'MoonController@dialTicket']);
    $router->get('dialAwardLog', ['uses' => 'MoonController@getDialLog']);
    $router->get('getUserTicket', ['uses' => 'MoonController@getUserTicket']);
    $router->get('getUserRank', ['uses' => 'MoonController@getUserRank']);
    $router->get('getShareConfig', ['uses' => 'LoverController@getShareConfig']);
    $router->get('getRoomRankList', ['uses' => 'MoonController@getRoomRankList']);
    $router->get('getUserRankList', ['uses' => 'MoonController@getUserRankList']);
    $router->get('createNewCacheKey', ['uses' => 'MoonController@createNewCacheKey']);


});


$router->group(['prefix' => 'nation'], function () use ($router) {
    $router->get('assignAction', ['uses' => 'NationController@assignAction']);
    $router->post('getBagLog', ['uses' => 'NationController@getUserRechargeBag']);
    $router->post('getUserGiftLog', ['uses' => 'NationController@getUserGiftLog']);
    $router->post('clickBag', ['uses' => 'NationController@clickBag']);
    $router->post('clickRing', ['uses' => 'NationController@clickRing']);
    $router->post('convertFlag', ['uses' => 'NationController@convertFlag']);
    $router->post('consumerTicket', ['uses' => 'NationController@consumerTicket']);
    $router->post('showFlagField', ['uses' => 'NationController@showFlagField']);
    $router->post('getRankCache', ['uses' => 'NationController@getRankCache']);
    $router->post('getMallLog', ['uses' => 'NationController@getMallLog']);
    $router->post('getAllLiang', ['uses' => 'NationController@getAllLiang']);
    $router->post('clickGrinLog', ['uses' => 'NationController@clickGrinLog']);
    $router->post('fieldConvertFlag', ['uses' => 'NationController@fieldConvertFlag']);


});

$router->group(['prefix' => 'newYear'], function () use ($router) {
    $router->get('test', ['uses' => 'NewYearController@assignAction']);

    $router->get('listenGift', ['uses' => 'NewYearController@listenGift']);
    $router->get('getUserGiftNum', ['uses' => 'NewYearController@getUserGiftNum']);
    $router->get('getUserRank', ['uses' => 'NewYearController@getUserRank']);
    $router->get('clickGift', ['uses' => 'NewYearController@clickGift']);
    $router->get('getHowe', ['uses' => 'NewYearController@getHowe']);
    $router->get('getYearlyReport', ['uses' => 'NewYearController@getYearlyReport']);
    $router->get('getShareConfig', ['uses' => 'NewYearController@getShareConfig']);
    $router->get('createPkRank', ['uses' => 'NewYearController@createPkRank']);
    $router->get('getPkRank', ['uses' => 'NewYearController@getPkRank']);
    $router->get('awardMall', ['uses' => 'NewYearController@awardMall']);

});


$router->group(['prefix' => 'lucky'], function () use ($router) {
    $router->get('index', ['uses' => 'LuckyController@index']);
});

$router->group(['prefix' => 'order_king'], function () use ($router) {
    $router->get('before_thirty', ['uses' => 'WhoIsOrderKingController@beforeThirty']);
    $router->get('user_info/{id}', ['uses' => 'WhoIsOrderKingController@userInfo']);
    $router->get('provide_diamond', ['uses' => 'WhoIsOrderKingController@provideDiamond']);
});

$router->group(['prefix' => 'convene'], function () use ($router) {
    $router->get('invite/{id}', ['uses' => 'ConveneController@userInfo']);                           // 获取邀请者信息
    $router->get('statistics/{id}', ['uses' => 'ConveneController@statisticsCalledInfo']);           // 他的召集统计
    $router->get('recharge/details/{id}', ['uses' => 'ConveneController@calledDetail']);
    $router->get('init', ['uses' => 'ConveneController@init']);
    $router->get('invite/info/{code}', ['uses' => 'ConveneController@getInviteInfo']);
    $router->get('carousel', ['uses' => 'ConveneController@carousel']);
    $router->post('create', ['uses' => 'ConveneController@bindPhone']);
});

$router->group(['prefix' => 'spring'], function () use ($router) {
    $router->get('ranking', ['uses' => 'SpringController@ranking']);
});

$router->group(['prefix' => 'five'], function () use ($router) {
    $router->get('test', ['uses' => 'FiveController@assignAction']);
    $router->get('first', ['uses' => 'FiveController@firstStage']);
    $router->get('second', ['uses' => 'FiveController@secondStage']);
    $router->get('third', ['uses' => 'FiveController@thirdStage']);
    $router->get('last', ['uses' => 'FiveController@lastStage']);
    $router->get('winner', ['uses' => 'FiveController@winnerList']);
    $router->get('rich', ['uses' => 'FiveController@richList']);
    $router->get('rich_1', ['uses' => 'FiveController@richList_1']);
    $router->post('vote', ['uses' => 'FiveController@toVote']);
    $router->get('initVoteNum', ['uses' => 'FiveController@initVoteNum']);//用户初始票数
    $router->get('voice', ['uses' => 'FiveController@voiceList']);//获取音频
    $router->get('bindPhone', ['uses' => 'FiveController@bindPhone']);//添加手机号
    $router->get('getSenderList', ['uses' => 'FiveController@getSenderList']);//
});
$router->group(['prefix' => 'fish'], function () use ($router) {
    $router->get('winner', ['uses' => 'FishController@fishwinner']);//钓鱼榜
    $router->get('pk', ['uses' => 'FishController@fishPk']);//pk
    $router->get('gift', ['uses' => 'FishController@fishGift']);//pk
});
$router->group(['prefix' => 'boat'], function () use ($router) {
    $router->get('user_info/{id}', ['uses' => 'BoatController@userInfo']);
    $router->get('assign', ['uses' => 'BoatController@assignAction']);//限时礼物消息队列
    $router->get('assignAppShare', ['uses' => 'BoatController@assignAppShare']);//限时礼物消息队列
    $router->get('getUserGift', ['uses' => 'BoatController@getUserGift']);//用户限时礼物
    $router->get('giftUpdate', ['uses' => 'BoatController@giftUpdate']);//用户限时礼物兑换
    $router->get('getPrize', ['uses' => 'BoatController@getPrize']);//奖品概率
    $router->post('diamion', ['uses' => 'BoatController@diamion']);//钻石减少
    $router->post('ticketUpdate', ['uses' => 'BoatController@ticketUpdate']);//抽奖券减少
    $router->get('getUserChip', ['uses' => 'BoatController@userChip']);//用户碎片
    $router->get('chipUpdate', ['uses' => 'BoatController@chipUpdate']);//碎片减少
    $router->get('getUserTask', ['uses' => 'BoatController@getUserTask']);//每日任务
    $router->get('taskCreate', ['uses' => 'BoatController@taskCreate']);//每日任务
    $router->get('taskUpdate', ['uses' => 'BoatController@taskUpdate']);//每日任务兑换
    $router->get('getGiftList', ['uses' => 'BoatController@giftList']);//积分榜单
});


$router->group(['prefix' => 'dish'], function () use ($router) {
    $router->get('getConfig', ['uses' => 'DishController@getConfig']);
    $router->get('openRoom', ['uses' => 'DishController@getOpenRoom']);
    $router->get('openPayDish', ['uses' => 'DishController@openPayDishRoom']);
    $router->get('clickAward', ['uses' => 'DishController@clickAward']);
    $router->get('giveGift', ['uses' => 'DishController@awardFreeGift']);
    $router->get('payAwardGift', ['uses' => 'DishController@awardPayGift']);
    $router->get('userDishInfo', ['uses' => 'DishController@getUserDishInfo']);
    $router->get('newOpenRoom', ['uses' => 'DishController@newOpenRoom']);
    $router->get('getGiftLog', ['uses' => 'DishController@getGiftLog']);
    $router->get('jumpRoom', ['uses' => 'DishController@jumpDishRoom']);
    $router->get('createAwardPond', ['uses' => 'DishController@createAwardPond']);
    $router->get('popAwardPond', ['uses' => 'DishController@popAwardPond']);
});

$router->group(['prefix' => 'wishingtree'], function () use ($router) {
    $router->Post('ticket/used', ['uses' => 'WishingTreeController@ticketUsed']);//使用锤子
});

$router->group(['prefix' => 'sound_byte'], function () use ($router) {
    $router->get('personal/list', ['uses' => 'SoundByteController@soundBytePersonalListByType']);
    $router->get('small_house/list', ['uses' => 'SoundByteController@getSmallHouseCountRank']);
    $router->get('family/list', ['uses' => 'SoundByteController@soundByteFamilyList']);
    $router->get('rank/set_advanced', ['uses' => 'SoundByteController@setAdvanced']);
    $router->get('rank/set_suspend', ['uses' => 'SoundByteController@setSuspendTime']);
    $router->get('rank/time_step', ['uses' => 'SoundByteController@getSoundByteStep']);
    $router->get('friends/get_rank', ['uses' => 'SoundByteController@getFriendsCountRank']);
    $router->get('friends/set_rank', ['uses' => 'SoundByteController@setFriendsCountRank']);
    $router->get('friends/suspend', ['uses' => 'SoundByteController@setFriendsSuspendTime']);
    $router->get('diamond/get_rank', ['uses' => 'SoundByteController@getDiamondCountRank']);
    $router->get('diamond/set_rank', ['uses' => 'SoundByteController@setDiamondCountRank']);
    $router->get('diamond/suspend', ['uses' => 'SoundByteController@setDiamondSuspendTime']);
    $router->get('intimacy/get_rank', ['uses' => 'SoundByteController@getIntimacyCountRank']);
//    $router->get('intimacy/set_rank', ['uses' => 'SoundByteController@setIntimacyCountRank']);
//    $router->get('intimacy/suspend', ['uses' => 'SoundByteController@setIntimacySuspendTime']);
    //$router->get('room_duration/get_rank', ['uses' => 'SoundByteController@getRoomDurationCountRank']);//因为小窝时长在数据表里不做记录 无法使用。所以废弃
    //$router->get('room_duration/set_rank', ['uses' => 'SoundByteController@setRoomDurationCountRank']);//因为小窝时长在数据表里不做记录 无法使用。所以废弃
    //$router->get('room_duration/suspend', ['uses' => 'SoundByteController@setRoomDurationSuspendTime']);//因为小窝时长在数据表里不做记录 无法使用。所以废弃
    $router->get('test', ['uses' => 'SoundByteController@getTest']);
});


$router->group(['prefix' => 'lights'], function () use ($router) {
    $router->get('payCard', ['uses' => 'LightsCardController@payCard']);//购买点亮卡
    $router->get('awardLog', ['uses' => 'LightsCardController@getAwardLog']);//购买点亮卡
    $router->get('getInfo', ['uses' => 'LightsCardController@getInfo']);//购买点亮卡
    $router->get('getGiftList', ['uses' => 'LightsCardController@getGiftList']);//获取点亮礼物列表
    $router->get('lightsGift', ['uses' => 'LightsCardController@lightsGift']);//获取点亮礼物列表
    $router->get('getMedal', ['uses' => 'LightsCardController@getMedal']);//获取点亮礼物列表
    $router->get('getPond', ['uses' => 'LightsCardController@getPond']);//获取点亮礼物列表
});


$router->group(['prefix' => 'newYearGoods'], function () use ($router) {
    $router->get('create', ['uses' => 'NewYearGoodsController@createNewYearGoods']);//开启年货活动
    $router->get('partake', ['uses' => 'NewYearGoodsController@partakeNewYearGoodsBag']);//开启年货活动
    $router->get('awardScoreList', ['uses' => 'NewYearGoodsController@awardScoreList']);//自动发奖
    $router->get('getUserLog', ['uses' => 'NewYearGoodsController@getUserLog']);//用户获奖记录
    $router->get('getRoomLog', ['uses' => 'NewYearGoodsController@getRoomLog']);//房间开启记录
    $router->get('getRoomBagInfo', ['uses' => 'NewYearGoodsController@getRoomOpenInfo']);//房间开启记录
    $router->get('getUserPartake', ['uses' => 'NewYearGoodsController@getUserPartake']);//房间开启记录
    $router->get('openRoom', ['uses' => 'NewYearGoodsController@getOpenRoom']);//房间开启
//    $router->get('getPond', ['uses' => 'NewYearGoodsController@getPond']);//房间开启
});


$router->group(['prefix' => 'call'], function () use ($router) {
    $router->get('payCall', ['uses' => 'CallController@payCall']);//房间开启
    $router->get('award', ['uses' => 'CallController@awardMall']);//房间开启
    $router->get('speedAward', ['uses' => 'CallController@speedAward']);//房间开启
    $router->get('getCallUserInfo', ['uses' => 'CallController@getCallUserInfo']);//房间开启
    $router->get('getLog', ['uses' => 'CallController@getLog']);//房间开启
    $router->get('getUserSendMsg', ['uses' => 'CallController@getUserSendMsg']);//房间开启

});


$router->group(['prefix' => 'task'], function () use ($router) {
    $router->get('refreshTask', ['uses' => 'TaskController@refreshTask']);//
    $router->get('getTaskInfo', ['uses' => 'TaskController@getTaskInfo']);//
    $router->get('completeTask', ['uses' => 'TaskController@completeTask']);//
    $router->get('clickAwardDiamond', ['uses' => 'TaskController@clickAwardDiamond']);//
    $router->get('allUserCompleteTask', ['uses' => 'TaskController@allUserCompleteTask']);//
    $router->get('getInvite', ['uses' => 'TaskController@getInvite']);//
    $router->get('test', ['uses' => 'TaskController@test']);//
});






